package com.cspg.ssss.service;

import com.cspg.ssss.repository.AnalysisMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 数据分析服务
 */
@Service
public class AnalysisService {

    @Autowired
    AnalysisMapper analysisMapper;

    /**
     * 单位对部门评分，从考核部门角度分析评分问题情况（含各个考核部门评分问题总数，已评分数量，待反馈终审数量，完成评分问题数量）
     * @param condition
     * @return
     */
    public List<Map<String,Object>> getDeptGradeAnalysis(Map<String,Object> condition){

        return analysisMapper.findDeptGradeAnalysis(condition);
    }

    /**
     * 单位对部门评分，获取单位各被考核部门加分和扣分总计情况
     * @param condition
     * @return
     */
    public List<Map<String,Object>> getDeptBmmcGradeScoreAnalysis(Map<String,Object> condition){

        return analysisMapper.findDeptBmmcGradeScoreAnalysis(condition);
    }

    public List<Map<String,Object>> getDeptGradeStageAnalysis(Map<String,Object> condition){
        return analysisMapper.findDeptGradeStageAnalysis(condition);
    }

    public List<Map<String,Object>> getDeptFeedbackStageAnalysis(Map<String,Object> condition){
        return analysisMapper.findDeptFeedbackStageAnalysis(condition);
    }

    public List<Map<String,Object>> getDeptReviewStageAnalysis(Map<String,Object> condition){
        return analysisMapper.findDeptReviewStageAnalysis(condition);
    }

    public List<Map<String,Object>> findDeptRectifyAnalysis(Map<String,Object> condition){
        return analysisMapper.findDeptRectifyAnalysis(condition);
    }

    public List<Map<String,Object>> getDeptRectifyIntimeCountAnalysis(Map<String,Object> condition){
        return analysisMapper.findDeptRectifyIntimeCountAnalysis(condition);
    }

    public List<String> getDeptGroupList(Map<String,Object> condition){
        return analysisMapper.findDeptGroupList(condition);
    }

    public List<Map<String,Object>> getFieldCountByDept(Map<String,Object> condition){
        return analysisMapper.findFieldCountByDept(condition);
    }


}
